Adding a Variable to a Topic
If there is a piece of information that you plan on using multiple times in your documentation, but it seems too small for a snippet, you can add that piece of information as a variable. Variables can include things like company names, phone numbers, addresses, dates, and version numbers. Like snippets, variables are saved as files which you can access to edit every instance of the variable at the same time. Variables typically consist of information that is likely to change with time, hence the name.
Creating a Variable
- Double-click General in the Variables folder in the Project Organizer. The Variable Set Editor appears.
- Click the Add variable icon at the top of the Variable Set Editor. A new variable appears in the Variable Set Editor.
- Double-click on the cell in the Name column to select the text it contains and delete the text “NewVariable.”
- Type a descriptor for the new variable.
- Double-click on the cell in the Definition column.
- Type the text that you want to appear wherever the variable is inserted.
Inserting a Variable
- Open the topic you want to insert a variable into. Topics are located in the Content Explorer.
- Place the cursor where you want to insert the variable in the topic.
- Select the Insert tab to open the Insert ribbon appears.
- Click theVariable icon in the Single Source section of the Insert Ribbon. The Variable window appears.
- Select the variable set containing the variable you want to insert in the Variable Sets column. If you created a variable using the steps in "Creating a Variable," it will be in the General variable set.
- Select the variable you want to insert on the right side of the Variable window.
- Click OK. The variable appears in the topic at the location of the cursor.